package com.example.howard.picview;

import android.app.Application;

import com.example.howard.picview.DateBase.GetImageDate;
import com.example.howard.picview.Tab1Fragment.Tab1Fragment;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;

/**
 * Created by Howard on 2016/9/2.
 */
public class MyApplication extends Application {
    public GetImageDate getImageDate;
    public List<Map<String, Object>> imagedata = new ArrayList<>();
    public List<String> showimage = new ArrayList<>();
    public ArrayList<Boolean> selectItems=new ArrayList<>();
    public Tab1Fragment tab1Fragment;


    @Override
    public void onCreate() {
        super.onCreate();
        getImageDate=new GetImageDate();
        imagedata=getImageDate.getImageFiles(this);
        Collections.reverse(imagedata);
    }
    public void setShowimage(List<String> list){
        this.showimage=list;
    }

    public void setImagedata(){
        getImageDate=new GetImageDate();
        imagedata=getImageDate.getImageFiles(this);
        Collections.reverse(imagedata);
    }

    public void setSelectItems(ArrayList<Boolean> list){
        selectItems=list;
    }
    public ArrayList<Boolean> getSelectItems() {
        return selectItems;
    }
    public void setTab1Fragment (Tab1Fragment tab1Fragment){
        this.tab1Fragment=tab1Fragment;
    }
}
